home *** CD-ROM | disk | FTP | other *** search
/ Delphi Informant Complete 1995 - 2000 / Delphi Informant Complete 1995 to 2000.iso / Delphi Informant Magazine Complete Works SOURCE CODE 1995.rar / 1995 / OCT / CJ9510 / maketes.pas < prev    next >
Pascal/Delphi Source File  |  1995-08-22  |  943b  |  44 lines

  1. unit Maketes;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, Grids, DBGrids, DB, DBTables;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     DataSource1: TDataSource;
  12.     Table1: TTable;
  13.     DBGrid1: TDBGrid;
  14.     Button1: TButton;
  15.     procedure Button1Click(Sender: TObject);
  16.   private
  17.     { Private declarations }
  18.   public
  19.     { Public declarations }
  20.   end;
  21.  
  22. var
  23.   Form1: TForm1;
  24.  
  25. implementation
  26.  
  27. {$R *.DFM}
  28.  
  29. procedure TForm1.Button1Click(Sender: TObject);
  30. begin
  31. Table1.Active := False;
  32. Table1.TableName := 'TEST.db';
  33. Table1.TableType := ttParadox;
  34. Table1.FieldDefs.Clear;
  35. Table1.FieldDefs.Add('FullName', ftString, 20,True);
  36. Table1.FieldDefs.Add('DateOfBirth', ftDate,0,False);
  37. Table1.FieldDefs.Add('NumberOfChildren', ftInteger,0,False);
  38. Table1.FieldDefs.Add('Salary', ftCurrency,0,False);
  39. Table1.CreateTable;
  40. Table1.Active := True;
  41. end;
  42.  
  43. end.
  44.